<template>
    <el-dialog
        :visible.sync="dialogVisible"
        width="753px"
        :before-close="handleCloseFS"
        class="userListDialog"
    >
        <img
            class="userListDialogTit"
            src="@/assets/img/tit01.png"
            alt="mind map"
        />
        <el-scrollbar
            class="userListDialogBody"
            :native="false"
            wrapStyle=""
            wrapClass=""
            viewClass=""
            viewStyle=""
            :noresize="false"
        >
            <div class="userListDialogData">
                <div
                    class="UserItem"
                    v-for="(item, index) in VUX_UserList"
                    :key="index"
                    :class="{
                        UserItemSelect: item.userDisabled === 1 ? true : false
                    }"
                >
                    <UserImg
                        class="UserImg"
                        :compdata="item"
                        :userType="item.userDisabled === 1 ? 'userSelect' : ''"
                    />
                </div>
            </div>
        </el-scrollbar>
    </el-dialog>
</template>

<script>
import { mapGetters } from 'vuex';
import UserImg from '@/components/userImg/userImg.vue';

export default {
    components: {
        UserImg,
    },
    data() {
        return {
            dialogVisible: false,
        };
    },
    computed: {
        ...mapGetters(['VUX_UserList']),
    },
    methods: {
        openFS() {
            this.dialogVisible = true;
        },
        handleCloseFS(done) {
            this.dialogVisible = false;
        },
        handleOkFS() {
            this.dialogVisible = false;
        },
    },
};
</script>
<style lang="scss" scoped>
// 暗夜
@media (prefers-color-scheme: dark) {
    .UserItem {
        box-shadow: 0px 0px 6px rgba(232, 234, 237, 0.3);
        &:hover {
            box-shadow: 0px 0px 8px rgba(232, 234, 237, 0.6);
        }
    }
}

// 正常
@media (prefers-color-scheme: light) {
    .UserItem {
        box-shadow: 0px 0px 6px rgba(32, 33, 36, 0.3);
        &:hover {
            box-shadow: 0px 0px 8px rgba(32, 33, 36, 0.6);
        }
    }
}

.userListDialog {
    .userListDialogBody {
        height: 300px;
        overflow-y: auto;
    }
    .userListDialogTit {
        display: block;
        width: 60%;
        height: auto;
        margin: 0 auto;
        margin-bottom: 32px;
    }
    .userListDialogData {
        display: flex;
        flex-wrap: wrap;
        .UserItem {
            padding: 8px;
            margin: 16px;
            border-radius: 8px;
            cursor: pointer;
            transition: box-shadow 0.3s;
            .UserImg {
                width: 130px;
                height: 130px;
            }
        }
        .UserItemSelect{
            box-shadow: 0px 0px 6px #ca005d;
        }
    }
}
</style>
